package com.billsystem.service;

import com.billsystem.mapper.DreamMapper;
import com.billsystem.pojo.Account;
import com.billsystem.pojo.Dream;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DreamService {
    @Autowired
    private DreamMapper dreamMapper;
    /*
    增加一个梦想
     */
    public void addDream(Dream dream) {
        dreamMapper.addDream(dream);
    }
    /*
    删除一个梦想
     */
    public void deleteDream(Dream dream) {
        dreamMapper.deleteDream(dream);
    }

    /*
    通过用户id查询所有梦想
     */
    public List<Dream> queryListByUid(int uid){
        return dreamMapper.queryListByUid(uid);
    }
    /*
    修改梦想信息
     */
    public void updateDream(Dream dream) {
        dreamMapper.updateDream(dream);
    }
    /*
    修改梦想的状况
     */
    public void updateState(Dream dream) {
        dreamMapper.updateState(dream);
    }
}
